package day1103.demo03;

/**
 * @author wql
 * @version 1.0
 * @date 2022/11/3 10:00
 */

public class WqlCan {
    public static void main(String[] args) {
        Tom t =a->{
            int sum=0;
            for (int i : a) {
                sum+=i;
            }
            return sum;
        };
        fun(t);
    }
    public static void  fun(Tom t){
        int sum[]={12,13,14,15};
        int sun=t.getSum(sum);
        System.out.println("sun = " + sun);
    }
}
interface Tom{
    public int getSum(int [] arr);
}